﻿using System.ComponentModel.Composition;
using Caliburn.Micro;
using Scrabble.Model;

namespace Scrabble.ViewModels
{
    [Export(typeof(PoolViewModel)), PartCreationPolicy(CreationPolicy.NonShared)]
    public class PoolViewModel : PropertyChangedBase
    {
        private readonly IGame _game;

        public PoolViewModel(IGame game)
        {
            _game = game;
            _game.PoolChanged += delegate { NotifyOfPropertyChange(() => Statistics); };
        }

        public object Statistics
        {
            get { return _game.TileUsage; }
        }
    }
}
